<%@ page language="java"
	import="java.util.*,cn.sypt.yuhao.domain.*,cn.sypt.yuhao.dao.*"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
	+ request.getServerName() + ":" + request.getServerPort()
	+ path + "/admin/";
	
	ArrayList al=(ArrayList)request.getAttribute("exam");
	Video video=(Video)request.getAttribute("video");

%>

<!DOCTYPE HTML PUBLIC>
<html>
<head>
<base href="<%=basePath%>">
<title>后台管理系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--[if lt IE 9]>
		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script src="Javascript/Flot/excanvas.js"></script>
	<![endif]-->
<!-- The Fonts -->
<link href="http://fonts.useso.com/css?family=Oswald|Droid+Sans:400,700"
	rel="stylesheet">
<!-- The Main CSS File -->
<link rel="stylesheet" href="CSS/style.css">
<!-- jQuery -->
<script src="Javascript/jQuery/jquery-1.7.2.min.js"></script>
<!-- Flot -->
<script src="Javascript/Flot/jquery.flot.js"></script>
<script src="Javascript/Flot/jquery.flot.resize.js"></script>
<script src="Javascript/Flot/jquery.flot.pie.js"></script>
<!-- DataTables -->
<script src="Javascript/DataTables/jquery.dataTables.min.js"></script>
<!-- ColResizable -->
<script src="Javascript/ColResizable/colResizable-1.3.js"></script>
<!-- jQuryUI -->
<script src="Javascript/jQueryUI/jquery-ui-1.8.21.min.js"></script>
<!-- Uniform -->
<script src="Javascript/Uniform/jquery.uniform.js"></script>
<!-- Tipsy -->
<script src="Javascript/Tipsy/jquery.tipsy.js"></script>
<!-- Elastic -->
<script src="Javascript/Elastic/jquery.elastic.js"></script>
<!-- ColorPicker -->
<script src="Javascript/ColorPicker/colorpicker.js"></script>
<!-- SuperTextarea -->
<script src="Javascript/SuperTextarea/jquery.supertextarea.min.js"></script>
<!-- UISpinner -->
<script src="Javascript/UISpinner/ui.spinner.js"></script>
<!-- MaskedInput -->
<script src="Javascript/MaskedInput/jquery.maskedinput-1.3.js"></script>
<!-- ClEditor -->
<script src="Javascript/ClEditor/jquery.cleditor.js"></script>
<!-- Full Calendar -->
<script src="Javascript/FullCalendar/fullcalendar.js"></script>
<!-- Color Box -->
<script src="Javascript/ColorBox/jquery.colorbox.js"></script>
<!-- Kanrisha Script -->
<script src="Javascript/kanrisha.js"></script>
<script language="javascript">
function checkSub()
{
var flag=false;
var ttm=eform.ttm.value;
var ta=eform.ta.value;
var tb=eform.tb.value;
var tc=eform.tc.value;
var td=eform.td.value;
var tda=eform.tda.value;
var note=eform.note.value;

if(ttm.trim()=="")
{
window.alert("题目不能为空");
}
else if(ta.trim()=="")
{
window.alert("A选项不能为空");
}
else if(tb.trim()=="")
{
window.alert("B选项不能为空");
}
else if(tc.trim()=="")
{
window.alert("C选项不能为空");
}
else if(td.trim()=="")
{
window.alert("D选项不能为空");
}
else if(tda.trim()=="")
{
window.alert("答案不能为空");
}
else if(note.trim()=="")
{
window.alert("解析不能为空");
}
else
{
flag=true;
}

return flag;
}
</script>
</head>
<body>

	<%@include file="/admin/head.jsp"%>
	<div class="wrapper contents_wrapper">
		<%@include file="/admin/left.jsp"%>

		<div class="contents">
			<div class="grid_wrapper">

				

				<div class="g_12">
					<div class="widget_header">
						<h4 class="widget_header_title wwIcon i_16_tooltip"><%=video.getSpname() %>的实验习题集
							</h4>
					</div>
					<div class="widget_contents noPadding twCheckbox">
						<table class="tables datatable noObOLine">
							<thead>
								<tr>
									
									<th>题目</th>
									<th>A</th>
									<th>B</th>
									<th>C</th>
									<th>D</th>
									<th>答案</th>
									<th>解析</th>
									<th>修改</th>
									<th>删除</th>
								</tr>
							</thead>
							<tbody>
								<%
									for(int i=0;i<al.size();i++)
									{																			
									Exam exam=(Exam)al.get(i);
								%>
								<tr class="status_open">

									<td><%=exam.getTtm()%></td>									
									<td><%=exam.getTa()%></td>
									<td><%=exam.getTb()%></td>
									<td><%=exam.getTc()%></td>
									<td><%=exam.getTd()%></td>
									<td><%=exam.getTda()%></td>
									<td><%=exam.getNote() %></td>
									<td><a href="/sypt/admin/examglxg2.jsp?tid=<%=exam.getTid() %>&spid=<%=exam.getSpid() %>">修改</a></td>
									<td><a href="/sypt/ManagerServlet?flag=examgl2&flag1=dl&tid=<%=exam.getTid() %>">删除</a></td>
									<td></td>
									<%
									}
									 %>
							</tbody>
						</table>
					</div>
					<form action="/sypt/ManagerServlet?flag=examgl2&flag1=tj" name="eform" method="post">
						<div class="line_grid">
						<span class="label">添加题目</span>
							<div class="g_3"><span class="label">题目</span></div>							
								<input class="simple_field" type="text" name="ttm"/>
								<div class="g_3"><span class="label">A选项</span></div>
								<input class="simple_field" type="text" name="ta"/>
								<div class="g_3"><span class="label">B选项</span></div>
								<input class="simple_field" type="text" name="tb"/>
								<div class="g_3"><span class="label">C选项</span></div>
								<input class="simple_field" type="text" name="tc"/>
								<div class="g_3"><span class="label">D选项</span></div>
								<input class="simple_field" type="text" name="td"/>
								<div class="g_3"><span class="label">答案</span></div>
								<input class="simple_field" type="text" name="tda"/>
								<div class="g_3"><span class="label">解析</span></div>
								<input class="simple_field" type="text" name="note"/>
							<input type="submit" value="添加" onclick="return checkSub();">
							
						</div>
						</form>
					
				</div>
				
				<!-- Chats -->


			</div>
		</div>
	</div>
	<%@include file="/admin/foot.jsp" %>
	
</body>
</html>